package com.google.gson.internal.bind;

import com.google.gson.a.a;
import com.google.gson.internal.b;
import com.google.gson.internal.bind.TypeAdapter.Factory;
import com.google.gson.internal.f;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Map;

public final class u implements Factory {
    private final f a;

    public u(f fVar) {
        this.a = fVar;
    }

    public TypeAdapter create(l lVar, a aVar) {
        Type b = aVar.b();
        if (!(b instanceof ParameterizedType)) {
            return null;
        }
        Class a = aVar.a();
        if (!Map.class.isAssignableFrom(a)) {
            return null;
        }
        Type[] b2 = b.b(b, a);
        return b2[0] == String.class ? new v(this, lVar.a(a.a(b2[1])), this.a.a(aVar)) : null;
    }
}
